// 环形链表

var hasCycle = function(head) {
if(head == null || head.next == null) return false

let cur = head
while(cur) {
    if(cur.flag){
        return true
    }
    else {
        cur.flag = true
        cur = cur.next
    }
}
return false
}